﻿using Service.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace Client
{
    class Program
    {
        static void Main(string[] args)
        {
            using (ChannelFactory<IPeopleOperator> channelFactory = new ChannelFactory<IPeopleOperator>(new WSHttpBinding(), 
                "http://localhost:9999/PeopleService"))
            {
                IPeopleOperator proxy = channelFactory.CreateChannel();

                var person = proxy.GetPerson();
                Console.WriteLine(person.Name + " " + person.Age);
                Console.Read();
            }
        }
    }
}
